<template>
    <div class="quarterly_report">
        <!-- <xlUntil text="高端人才信息" :addBtn="false" :importBtn="false" v-bind="$attrs" @delBatch="delBatch" @addForm="addForm" @searchKeyWord="searchKeyWord" :export-xls-data="columns" :export-xls-url="url.exportXlsUrl"></xlUntil> -->
        <xlUntil text="高端人才信息"  v-bind="$attrs" @delBatch="delBatch" @addForm="addForm" @searchKeyWord="searchKeyWord" :export-xls-data="columns" :export-xls-url="url.exportXlsUrl"></xlUntil>
        <div class="xl-table-content">
            <xlTable
                    :columns="columns"
                    :dataSource="data"
                    rowKey="id"
                    :pagination="pagination"
                    :loading="loading"
                    @change="handleTableChange"
                    bordered
                    :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
                >
                <template v-slot:action="scope">
                    <a @click="editForm(scope.record)">编辑</a>
                    <a-divider type="vertical"/>
                    <a-dropdown>
                        <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
                        <a-menu slot="overlay">
                            <a-menu-item @click="seeForm(scope.record)">
                                <a>查看</a>
                            </a-menu-item>
                            <a-menu-item>
                                <a-popconfirm title="确定删除吗?" @confirm="() => delForm(scope.record.id)">
                                    <a>删除</a>
                                </a-popconfirm>
                            </a-menu-item>
                        </a-menu>
                    </a-dropdown>
                </template>
            </xlTable>
        </div>
        <xlForm ref="xlForm" @handleOk="handleOk"></xlForm>
        <seeForm ref="seeForm"></seeForm>
    </div>
</template>

<script>

    import xlMixin from '../../mixin/index'
    export default {
        name: "index",
        mixins:[xlMixin],
        data(){
            return{
                paramMore:{
                    "newDevOrgId": ''
                },
                columns:[
                    {
                        title: '序号排序',
                        key: 'rowIndex',
                        align: "center",
                        fixed: 'left',
                        width:'180px',
                        sorter: (a) => a.id,//排序
                        customRender: function (t, r, index) {
                            return parseInt(index) + 1;
                        }
                    },
                    {
                        title: '姓名',
                        dataIndex: 'name',
                        type:'input'
                    },
                    {
                        title: '手机号',
                        dataIndex: 'phone',
                        type:'input'
                    },
                    {
                        title: '证件号',
                        dataIndex: 'cardNo',
                        type:'input'
                    },
                    {
                        title: '毕业学院',
                        dataIndex: 'graduateSchool',
                        type:'input'
                    },
                    {
                        title: '学历',
                        dataIndex: 'education',
                        type:'input'
                    },
                    {
                        title: '是否海归',
                        dataIndex: 'returnee',
                        type:'radio',
                        typeData:[
                            {
                                dataName:'是',
                                dataValue:true
                            },
                             {
                                dataName:'否',
                                dataValue:false
                            }
                        ]
                    },
                    {
                        title: '个人获奖',
                        dataIndex: 'awardSituation',
                        type:'input'
                    },
                    {
                        title: '操作',
                        dataIndex: 'action',
                        align: "center",
                        fixed: 'right',
                        width:'150px',
                        scopedSlots: {customRender: 'action'},
                    }
                ],
                // 请求参数
                url: {
                    list: "/ndo/api/ndo/high/talent/page/list",
                    add: '/ndo/api/ndo/high/talent/save',
                    edit: '/ndo/api/ndo/high/talent/save',
                    delete: "/ndo/api/ndo/high/talent/remove",
                    deleteBatch: "/company/batch/remove",
                    exportXlsUrl: "/ndo/api/new/dev/org/export/team/members",
                    importExcelUrl: "/person/project/upload/cjjn"
                }
            }
        },
        props:{
            newDevOrgId:Number,
            test:Boolean
        },
        created(){
            this.formatMerge()
            this.paramMore.newDevOrgId = this.newDevOrgId
            this.loading = true
            this.pageOnload()
        },
        watch:{
            newDevOrgId(){
                this.paramMore.newDevOrgId = this.newDevOrgId
                this.loading = true
                this.pageOnload()
            }
        },
        methods:{

        }
    }
</script>
<style scoped>

</style>
